package com.yr.ryjk.sysuser.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.yr.ryjk.sysuser.entity.Permission;

public interface PermissionMapper {
    int deleteByPrimaryKey(String id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);

    @Delete("delete from permission where find_in_set(su_name,#{0})")
	void deleteBySuNames(String suNames);

    @Select("select * from permission where su_name=#{0}")
    @ResultMap("BaseResultMap")
	Permission selectBySuName(String suName);

    @Update("update permission set permissions=#{1} where su_name=#{0}")
	int updateBySuName(String suName, String permissions);
}